﻿namespace Resharper.Abstractions.CodeDom.Expressions
{
  using JetBrains.Annotations;

  /// <summary>Defines the <see cref="ConstantValue"/> class.</summary>
  public class ConstantValue
  {
    #region Constructors and Destructors

    /// <summary>Initializes a new instance of the <see cref="InternalConstantValue"/> class.</summary>
    /// <param name="constantValue">The constant value.</param>
    internal ConstantValue(JetBrains.ReSharper.Psi.ConstantValue constantValue)
    {
      this.InternalConstantValue = constantValue;
    }

    #endregion

    #region Properties

    /// <summary>
    /// Gets the value.
    /// </summary>
    [CanBeNull]
    public object Value
    {
      get
      {
        return this.InternalConstantValue.Value;
      }
    }

    /// <summary>
    /// Gets the internal constant value.
    /// </summary>
    internal JetBrains.ReSharper.Psi.ConstantValue InternalConstantValue { get; private set; }

    #endregion
  }
}